package com.Maykk.bytesStream;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @ClassName: com.Maykk.bytesStream.Demo02
 * @Description: TODO 字节流输入练习
 * @Author: MaykkStar@163.com
 */
public class Demo02 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("./Maykk.txt");
        int by = fis.read();
        // int by = fis.read();
        System.out.println((char) by);
        by = fis.read();
        System.out.println((char) by);
        by = fis.read();
        System.out.println((char) by);
        by = fis.read();
        System.out.println((char) by);
        by = fis.read();
        System.out.println(by);
//        System.out.println((char) by);
//        while (by != -1){
//            System.out.print((char)by);
//            by = fis.read();
//        }
        fis.close();
    }
}
